Salt data

NaCl

## tibble [17 x 4] (S3: tbl_df/tbl/data.frame)
##  $ navn      : num [1:17] 0 1 1 1 2 2 2 3 3 3 ...
##  $ Na  [mg/l]: num [1:17] 82 77 77 61 80 80 63 85 85 66 ...
##  $ Cl  [mg/l]: num [1:17] 131 117 118 97 120 120 100 127 125 105 ...
##  $ ...4      : chr [1:17] "Feed" "Feed" "Retentate" "Permeate" ...

CaCl2

## tibble [17 x 4] (S3: tbl_df/tbl/data.frame)
##  $ navn      : num [1:17] 0 1 1 1 2 2 2 3 3 3 ...
##  $ Ca  [mg/l]: num [1:17] 119 118 115 45 132 133 49 150 150 54 ...
##  $ Cl  [mg/l]: num [1:17] 216 223 220 106 246 248 109 277 265 121 ...
##  $ ...4      : chr [1:17] "Feed" "Feed" "Retentate" "Permeate" ...

SiO2

## tibble [17 x 4] (S3: tbl_df/tbl/data.frame)
##  $ navn        : num [1:17] 0 1 1 1 2 2 2 3 3 3 ...
##  $ SiO2  [mg/l]: num [1:17] 64.1 60.7 62 52.8 60.3 62.7 55.5 63.6 63.9 54.7 ...
##  $ Na  [mg/l]  : num [1:17] 47.6 48.5 48.3 21.1 53 52.7 24.4 59.5 58.9 27 ...
##  $ ...4        : chr [1:17] "Feed" "Feed" "Retentate" "Permeate" ...

MgSO4

Samlet Rejection

Osmotic Pressure

## [1] 23.19
## [1] 23.77
## [1] 24.13
## [1] 24.29
## [1] 24.42

We back in single salt databehandling

SS=rbind(Data,tst,tst2)
SS$recovery=SS$time/6
Mw_Cl=35.45
Mw_Na=22.99
Mw_Ca=40.078
Mw_SO4=96.06
Mw_SiO2=60.08
SS = SS%>%mutate("f_Na_mmol"=f_Na/Mw_Na)
SS = SS%>%mutate("f_Ca_mmol"=f_Ca/Mw_Ca)
SS = SS%>%mutate("f_Cl_mmol"=f_Cl/Mw_Cl)
SS = SS%>%mutate("f_SiO2_mmol"=f_SiO2/Mw_SiO2)

SS = SS%>%mutate("p_Na_mmol"=p_Na/Mw_Na)
SS = SS%>%mutate("p_Ca_mmol"=p_Ca/Mw_Ca)
SS = SS%>%mutate("p_Cl_mmol"=p_Cl/Mw_Cl)
SS = SS%>%mutate("p_SiO2_mmol"=p_SiO2/Mw_SiO2)

SS_plot=SS%>%gather(key="key",value="value",f_Na_mmol,f_Cl_mmol,f_SiO2_mmol,f_Ca_mmol)
SS_plot$ion=c(rep("Na",21),rep("Cl",21),rep("SiO2",21),rep("Ca",21))
SS_plot$var="Concentration"

ggplot(SS_plot,aes(x=recovery,y=value,color=ion))+geom_point()+geom_line()+facet_grid(cols=vars(exp))
## Warning: Removed 48 rows containing missing values (geom_point).
## Warning: Removed 46 row(s) containing missing values (geom_path).

SS_rej=SS%>%gather(key="key",value="value",Rej_Na,Rej_Cl,Rej_SiO2,Rej_Ca)
SS_rej$ion=c(rep("Na",21),rep("Cl",21),rep("SiO2",21),rep("Ca",21))
SS_rej$var="Rejection"

ggplot(SS_rej,aes(x=recovery,y=value,color=ion))+geom_point()+geom_line()+facet_grid(cols=vars(exp))
## Warning: Removed 54 rows containing missing values (geom_point).
## Warning: Removed 50 row(s) containing missing values (geom_path).

SS_tot_plot=SS%>%gather(key="key",value="value",f_Na_mmol,f_Cl_mmol,f_SiO2_mmol,f_Ca_mmol,Rej_Na,Rej_Cl,Rej_SiO2,Rej_Ca)
SS_tot_plot$ion=rep(c(rep("Na",21),rep("Cl",21),rep("SiO2",21),rep("Ca",21)),2)
SS_tot_plot$var=c(rep("Concentration",84),rep("Rejection",84))

ggplot(SS_tot_plot,aes(x=recovery,y=value,color=ion))+geom_point()+geom_line()+facet_grid(cols=vars(exp),row =vars(var),scale="free")
## Warning: Removed 102 rows containing missing values (geom_point).
## Warning: Removed 46 row(s) containing missing values (geom_path).